<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link href="../css/docs.css" type="text/css" rel="stylesheet"/>
<link href="../css/prettify.css" type="text/css" rel="stylesheet"/>
<script src="../js/prettify.js" type="text/javascript"></script>
</head>
<body onLoad="prettyPrint()">
<div class="g-unit" id="doc-content">
  <div id="api-info-block">
    <div class="api-level">H3C CAS云管理平台</div>
  </div>
  <div id="jd-header">
    <h1>查询指定虚拟机概要信息</h1>
  </div>
  <div id="jd-content">
    <div class="jd-descr">
      <p>根据虚拟机id查询指定虚拟机的概要信息。</p>

      <h2><a name="uri"></a>接口 URI</h2>
      <p>/cas/casrs/vm/{id}/summary/new</p>

      <h2><a name="access"></a>访问方法</h2>
      <dl>
        <dt><b>HTTP 方法</b></dt>
        <dd>GET</dd>
        <dt><b>参数</b></dt>
        <table id="pubmethods" class="jd-sumtable"><tbody><tr>
          <th colspan="2">路径参数（Path Parameter）</th>
        </tr>
	        
	        <tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">id</span></td>
	          <td class="jd-linkcol" width="100%">
	            <span class="sympad">虚拟机id 。</span>
              <div class="jd-descrdiv">长整数（long）类型。必须，无缺省值。</div>	          </td>
	        </tr>
        </table>
      </dl>

      <h2><a name="result"></a>返回结果</h2>
      <dl>
      	<dt><b>状态码</b></dt>
    		<dd><ul>
    			<li>200(OK)：成功。</li>
    		</ul></dd>

	      <dt><b>消息头</b></dt>	      
	      <div class="source">
	        <pre class="prettyprint lang-xml">
HTTP/1.1 200 OK
</pre>
	      </div>

        <dt><b>消息体</b></dt>
        <div class="source">
          <pre class="prettyprint lang-xml">	  
&lt;domainSummary&gt;
	&lt;title&gt;hxq&lt;/title&gt;
	&lt;domainName&gt;hxq&lt;/domainName&gt;
	&lt;isEdit&gt;true&lt;/isEdit&gt;
	&lt;hostName&gt;hxnserver56&lt;/hostName&gt;
	&lt;hostIp&gt;192.168.20.56&lt;/hostIp&gt;
	&lt;status&gt;running&lt;/status&gt;
	&lt;osVersion&gt;CentOS Linux release 7.2.1511 (Core)&lt;/osVersion&gt;
	&lt;system&gt;1&lt;/system&gt;
	&lt;cpu&gt;2&lt;/cpu&gt;
	&lt;cpuSocket&gt;2&lt;/cpuSocket&gt;
	&lt;cpuCore&gt;1&lt;/cpuCore&gt;
	&lt;memory&gt;4.0GB&lt;/memory&gt;
	&lt;cpuRate&gt;64.26446280991736&lt;/cpuRate&gt;
	&lt;memoryRate&gt;11.103719008264465&lt;/memoryRate&gt;
	&lt;storage&gt;40.00GB&lt;/storage&gt;
	&lt;castools&gt;运行&lt;/castools&gt;
	&lt;castoolRunning&gt;true&lt;/castoolRunning&gt;
	&lt;castoolVersion&gt;5.0.5.0&lt;/castoolVersion&gt;
	&lt;castoolStatus&gt;1&lt;/castoolStatus&gt;
	&lt;createTime&gt;2018-02-24 14:59:26&lt;/createTime&gt;
	&lt;uptime&gt;2859&lt;/uptime&gt;
	&lt;lastOffTime&gt;0&lt;/lastOffTime&gt;
	&lt;uuid&gt;61eaee62-dc53-4978-8870-d795454406ac&lt;/uuid&gt;
	&lt;osBit&gt;x86_64&lt;/osBit&gt;
	&lt;displayType&gt;VNC&lt;/displayType&gt;
	&lt;autoConfig&gt;是&lt;/autoConfig&gt;
	&lt;vncport&gt;5900&lt;/vncport&gt;
	&lt;haStatus&gt;0&lt;/haStatus&gt;
	&lt;haManage&gt;1&lt;/haManage&gt;
	&lt;vncProxy&gt;否&lt;/vncProxy&gt;
	&lt;pae&gt;是&lt;/pae&gt;
	&lt;acpi&gt;是&lt;/acpi&gt;
	&lt;apic&gt;是&lt;/apic&gt;
	&lt;cpuTune&gt;中&lt;/cpuTune&gt;
	&lt;ioTune&gt;中&lt;/ioTune&gt;
	&lt;memoryTune&gt;低&lt;/memoryTune&gt;
	&lt;autoMigrate&gt;否&lt;/autoMigrate&gt;
	&lt;protectModel&gt;不启用&lt;/protectModel&gt;
	&lt;protect&gt;0&lt;/protect&gt;
	&lt;hostStatus&gt;1&lt;/hostStatus&gt;
	&lt;pageHostStatus&gt;1&lt;/pageHostStatus&gt;
	&lt;secretLevel&gt;内部公开&lt;/secretLevel&gt;
	&lt;templateId&gt;38&lt;/templateId&gt;
	&lt;isSecret&gt;false&lt;/isSecret&gt;
	&lt;diskSecret&gt;false&lt;/diskSecret&gt;
	&lt;isClusterSafety&gt;false&lt;/isClusterSafety&gt;
	&lt;existPrealloc&gt;false&lt;/existPrealloc&gt;
	&lt;existRaw&gt;false&lt;/existRaw&gt;
	&lt;haEnable&gt;1&lt;/haEnable&gt;
&lt;/domainSummary&gt;
          </pre>
        </div>
      <dt><a name="detail"></a><b>元素含义</b></dt>
        <table id="pubmethods" class="jd-sumtable"><tbody><tr>
          <th colspan="2"><span class="prettyprint lang-xml">domain</span>各子元素</th>
	        <tr class="alt-color">
	          <td class="jd-typecol"><span class="prettyprint lang-xml">title</span></td>
	          <td class="jd-linkcol" width="100%">
	            <span class="sympad">虚拟机显示名称。</span>
                <div class="jd-descrdiv">字符串（String）类型。</div>	          </td>
	        </tr>		
			<tr>
	          <td class="jd-typecol"><span class="prettyprint lang-xml">domainName</span></td>
	          <td class="jd-linkcol" width="100%">
	            <span class="sympad">虚拟机名称。</span>
                <div class="jd-descrdiv">字符串（String）类型。</div>	          </td>
	        </tr> 
			<tr class="alt-color">
	          <td class="jd-typecol"><span class="prettyprint lang-xml">isEdit</span></td>
	          <td class="jd-linkcol" width="100%">
	            <span class="sympad">是否可修改虚拟机，返回true。</span>
                <div class="jd-descrdiv">布尔（Boolean）类型。</div>	          </td>
	        </tr>
	        <tr class="alt-color">
	          <td class="jd-typecol"><span class="prettyprint lang-xml">desc</span></td>
	          <td class="jd-linkcol" width="100%">
	            <span class="sympad">虚拟机描述信息。</span>
                <div class="jd-descrdiv">字符串（String）类型。</div>	          </td>
	        </tr>
	        <tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">hostName</span></td>
	          <td class="jd-linkcol" width="100%">
                <span class="sympad">虚拟机所在主机名称</span>
              <div class="jd-descrdiv">字符串（String）类型。</div>	          </td>
	        </tr>
	        <tr class="alt-color">
	          <td class="jd-typecol"><span class="prettyprint lang-xml">hostIp</span></td>
	          <td class="jd-linkcol" width="100%">
	            <span class="sympad">虚拟机所在主机IP。</span>
                <div class="jd-descrdiv">字符串（String）类型。</div>	          </td>
	        </tr>
	        <tr>
	          <td class="jd-typecol"><span class="prettyprint lang-xml">status</span></td>
	          <td class="jd-linkcol" width="100%">
	            <span class="sympad">虚拟机状态。</span>
                <div class="jd-descrdiv">字符串（String）类型。</div>	          </td>
	        </tr>
			 <tr class="alt-color">
	          <td class="jd-typecol"><span class="prettyprint lang-xml">osVersion</span></td>
	          <td class="jd-linkcol" width="100%">
	            <span class="sympad">虚拟机操作系统名称。</span>
                <div class="jd-descrdiv">字符串（String）类型。</div>	          </td>
	        </tr>
			 <tr class="alt-color">
	          <td class="jd-typecol"><span class="prettyprint lang-xml">system</span></td>
	          <td class="jd-linkcol" width="100%">
	            <span class="sympad">虚拟机安装的操作系统类型。0：Windows 1：Linux。</span>
                <div class="jd-descrdiv">整数（int）类型。</div>	          </td>
	        </tr>
			<tr class="alt-color">
	          <td class="jd-typecol"><span class="prettyprint lang-xml">cpu</span></td>
	          <td class="jd-linkcol" width="100%">
	            <span class="sympad">虚拟机CPU总个数。</span>
                <div class="jd-descrdiv">整数（int）类型。</div>	          </td>
	        </tr>
			<tr>
	          <td class="jd-typecol"><span class="prettyprint lang-xml">cpuSocket</span></td>
	          <td class="jd-linkcol" width="100%">
	            <span class="sympad">CPU个数。</span>
                <div class="jd-descrdiv">整数（int）类型。</div>	          </td>
	        </tr>
			<tr class="alt-color">
	          <td class="jd-typecol"><span class="prettyprint lang-xml">cpuCore</span></td>
	          <td class="jd-linkcol" width="100%">
	            <span class="sympad">CPU核数。</span>
                <div class="jd-descrdiv">整数（int）类型。</div>	          </td>
	        </tr>
			<tr>
	          <td class="jd-typecol"><span class="prettyprint lang-xml">memory</span></td>
	          <td class="jd-linkcol" width="100%">
	            <span class="sympad">虚拟机内存大小。</span>
                <div class="jd-descrdiv">字符串（String）类型。</div>	          </td>
	        </tr>
			<tr class="alt-color">
	          <td class="jd-typecol"><span class="prettyprint lang-xml">cpuRate</span></td>
	          <td class="jd-linkcol" width="100%">
	            <span class="sympad">虚拟机CPU利用率。</span>
                <div class="jd-descrdiv">浮点型（Double）类型。</div>	          </td>
	        </tr>
			<tr>
	          <td class="jd-typecol"><span class="prettyprint lang-xml">memoryRate</span></td>
	          <td class="jd-linkcol" width="100%">
	            <span class="sympad">虚拟机内存利用率。</span>
                <div class="jd-descrdiv">浮点型（Double）类型。</div>	          </td>
	        </tr>
			<tr class="alt-color">
	          <td class="jd-typecol"><span class="prettyprint lang-xml">storage</span></td>
	          <td class="jd-linkcol" width="100%">
	            <span class="sympad">虚拟机存储容量。</span>
                <div class="jd-descrdiv">字符串（String）类型。</div>	          </td>
	        </tr>
			<tr>
	          <td class="jd-typecol"><span class="prettyprint lang-xml">castools</span></td>
	          <td class="jd-linkcol" width="100%">
	            <span class="sympad">CASTools状态。</span>
                <div class="jd-descrdiv">整数（int）类型。</div>	          </td>
	        </tr>
			<tr class="alt-color">
	          <td class="jd-typecol"><span class="prettyprint lang-xml">castoolRunning</span></td>
	          <td class="jd-linkcol" width="100%">
	            <span class="sympad">CASTools是否运行。</span>
                <div class="jd-descrdiv">布尔（Boolean）类型。</div>	          </td>
	        </tr>
			<tr>
	          <td class="jd-typecol"><span class="prettyprint lang-xml">castoolVersion</span></td>
	          <td class="jd-linkcol" width="100%">
	            <span class="sympad">CASTools版本信息。</span>
                <div class="jd-descrdiv">字符串（String）类型。</div>	          </td>
	        </tr>
	        <tr class="alt-color">
	          <td class="jd-typecol"><span class="prettyprint lang-xml">castoolStatus</span></td>
	          <td class="jd-linkcol" width="100%">
	            <span class="sympad">虚拟机CASTools状态。 0或者null：不需要升级 1：待升级 2：须登录系统升级。</span>
                <div class="jd-descrdiv">整数（int）类型。</div>	          </td>
	        </tr>
			<tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">createTime</span></td>
	          <td class="jd-linkcol" width="100%"><span class="sympad">虚拟机创建时间。</span>
	            <div class="jd-descrdiv">字符串（String）类型。</div>	          </td>
			</tr>
			<tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">uptime</span></td>
	          <td class="jd-linkcol" width="100%"><span class="sympad">连续运行时长。</span>
	            <div class="jd-descrdiv">整数（int）类型。</div>	          </td>
			</tr>	
			<tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">lastOffTime</span></td>
	          <td class="jd-linkcol" width="100%"><span class="sympad">虚拟机最后关机时间。</span>
	            <div class="jd-descrdiv">字符串（String）类型。</div>	          </td>
			</tr>
			<tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">uuid</span></td>
	          <td class="jd-linkcol" width="100%"><span class="sympad">虚拟机UUID。</span>
	            <div class="jd-descrdiv">字符串（String）类型。</div>	          </td>
			</tr>			
			<tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">osBit</span></td>
	          <td class="jd-linkcol" width="100%"><span class="sympad">虚拟机体系结构。</span>
	            <div class="jd-descrdiv">字符串（String）类型。</div>	          </td>
			</tr>			
			<tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">displayType</span></td>
	          <td class="jd-linkcol" width="100%"><span class="sympad">虚拟机显示类型。</span>
	            <div class="jd-descrdiv">字符串（String）类型。</div>	          </td>
			</tr>			
			<tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">autoConfig</span></td>
	          <td class="jd-linkcol" width="100%"><span class="sympad">虚拟机自动配置。</span>
	            <div class="jd-descrdiv">字符串（String）类型。</div>	          </td>
			</tr>			
			<tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">vncport</span></td>
	          <td class="jd-linkcol" width="100%"><span class="sympad">虚拟机VNC端口号。</span>
	            <div class="jd-descrdiv">整数（int）类型。</div>	          </td>
			</tr>			
			<tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">haStatus</span></td>
	          <td class="jd-linkcol" width="100%"><span class="sympad">虚拟机HA状态。0：正常 1：未加入HA 2：已加入HA，配置文件不同步。</span>
	            <div class="jd-descrdiv">整数（int）类型。</div>	          </td>
			</tr>			
			<tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">haManage</span></td>
	          <td class="jd-linkcol" width="100%">
				<span class="sympad">虚拟机HA管理状态。0：未被管理 1：被HA管理。</span>
				<div class="jd-descrdiv">整数（int）类型。</div>
			  </td>
			</tr>			
			<tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">vncProxy</span></td>
	          <td class="jd-linkcol" width="100%">
				<span class="sympad">启用VNC代理</span>
				<div class="jd-descrdiv">字符串（String）类型。</div>
			  </td>
			</tr>
			<tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">pae</span></td>
	          <td class="jd-linkcol" width="100%">
				<span class="sympad">物理地址扩展(PAE)。</span>
				<div class="jd-descrdiv">字符串（String）类型。</div>
			  </td>
			</tr>			
			<tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">acpi</span></td>
	          <td class="jd-linkcol" width="100%">
				<span class="sympad">高级配置与电源管理接口(ACPI)。</span>
				<div class="jd-descrdiv">字符串（String）类型。</div>
			  </td>
			</tr>
			<tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">apic</span></td>
	          <td class="jd-linkcol" width="100%">
				<span class="sympad">高级可编程中断控制器(APIC)。</span>
				<div class="jd-descrdiv">字符串（String）类型。</div>
			  </td>
			</tr>
			<tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">cpuTune</span></td>
	          <td class="jd-linkcol" width="100%">
				<span class="sympad">CPU调度优先级。</span>
				<div class="jd-descrdiv">字符串（String）类型。</div>
			  </td>
			</tr>
			<tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">ioTune</span></td>
	          <td class="jd-linkcol" width="100%">
				<span class="sympad">I/O优先级。</span>
				<div class="jd-descrdiv">字符串（String）类型。</div>
			  </td>
			</tr>
			<tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">memoryTune</span></td>
	          <td class="jd-linkcol" width="100%">
				<span class="sympad">内存资源优先级。</span>
				<div class="jd-descrdiv">字符串（String）类型。</div>
			  </td>
			</tr><tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">autoMigrate</span></td>
	          <td class="jd-linkcol" width="100%">
				<span class="sympad">自动迁移。</span>
				<div class="jd-descrdiv">字符串（String）类型。</div>
			  </td>
			</tr>
			<tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">protectModel</span></td>
	          <td class="jd-linkcol" width="100%">
				<span class="sympad">保护模式。</span>
				<div class="jd-descrdiv">字符串（String）类型。</div>
			  </td>
			</tr>
			<tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">protect</span></td>
	          <td class="jd-linkcol" width="100%">
				<span class="sympad">虚拟机是否启用保保护模式。0：不启用 1：启用。</span>
				<div class="jd-descrdiv">整数（int）类型。</div>
			  </td>
			</tr>
			<tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">hostStatus</span></td>
	          <td class="jd-linkcol" width="100%">
				<span class="sympad">虚拟机所在主机状态。0：不正常 1：正常。</span>
				<div class="jd-descrdiv">整数（int）类型。</div>
			  </td>
			</tr>
			<tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">pageHostStatus</span></td>
	          <td class="jd-linkcol" width="100%">
				<span class="sympad">主机维护模式。 1：正常模式 3：维护模式。</span>
				<div class="jd-descrdiv">整数（int）类型。</div>
			  </td>
			</tr>
			<tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">haEnable</span></td>
	          <td class="jd-linkcol" width="100%">
				<span class="sympad">虚拟机所在主机是否启用HA。0：未启用 1：启用。</span>
				<div class="jd-descrdiv">整数（int）类型。</div>
			  </td>
			</tr>
			
        </table>
	    <dt>&nbsp;</dt>
      </dl>
      <h2><a name="example"></a>应用举例</h2>
      <p>查询 ID为”52“的虚拟机详细信息。</p>
      <dl>
      	<dt><b>请求</b></dt>
        <div class="source">
          <pre class="prettyprint lang-xml">
GET http://localhost:8080/cas/casrs/vm/52
accept: application/xml
...        </pre>
        </div>
      	<dt><b>回应</b></dt>
        <div class="source">
          <pre class="prettyprint lang-xml">
HTTP/1.1 200 OK
Content-Type: application/xml
...
&lt;domainSummary&gt;
	&lt;title&gt;hxq&lt;/title&gt;
	&lt;domainName&gt;hxq&lt;/domainName&gt;
	&lt;isEdit&gt;true&lt;/isEdit&gt;
	&lt;hostName&gt;hxnserver56&lt;/hostName&gt;
	&lt;hostIp&gt;192.168.20.56&lt;/hostIp&gt;
	&lt;status&gt;running&lt;/status&gt;
	&lt;osVersion&gt;CentOS Linux release 7.2.1511 (Core)&lt;/osVersion&gt;
	&lt;system&gt;1&lt;/system&gt;
	&lt;cpu&gt;2&lt;/cpu&gt;
	&lt;cpuSocket&gt;2&lt;/cpuSocket&gt;
	&lt;cpuCore&gt;1&lt;/cpuCore&gt;
	&lt;memory&gt;4.0GB&lt;/memory&gt;
	&lt;cpuRate&gt;64.26446280991736&lt;/cpuRate&gt;
	&lt;memoryRate&gt;11.103719008264465&lt;/memoryRate&gt;
	&lt;storage&gt;40.00GB&lt;/storage&gt;
	&lt;castools&gt;运行&lt;/castools&gt;
	&lt;castoolRunning&gt;true&lt;/castoolRunning&gt;
	&lt;castoolVersion&gt;5.0.5.0&lt;/castoolVersion&gt;
	&lt;castoolStatus&gt;1&lt;/castoolStatus&gt;
	&lt;createTime&gt;2018-02-24 14:59:26&lt;/createTime&gt;
	&lt;uptime&gt;2859&lt;/uptime&gt;
	&lt;lastOffTime&gt;0&lt;/lastOffTime&gt;
	&lt;uuid&gt;61eaee62-dc53-4978-8870-d795454406ac&lt;/uuid&gt;
	&lt;osBit&gt;x86_64&lt;/osBit&gt;
	&lt;displayType&gt;VNC&lt;/displayType&gt;
	&lt;autoConfig&gt;是&lt;/autoConfig&gt;
	&lt;vncport&gt;5900&lt;/vncport&gt;
	&lt;haStatus&gt;0&lt;/haStatus&gt;
	&lt;haManage&gt;1&lt;/haManage&gt;
	&lt;vncProxy&gt;否&lt;/vncProxy&gt;
	&lt;pae&gt;是&lt;/pae&gt;
	&lt;acpi&gt;是&lt;/acpi&gt;
	&lt;apic&gt;是&lt;/apic&gt;
	&lt;cpuTune&gt;中&lt;/cpuTune&gt;
	&lt;ioTune&gt;中&lt;/ioTune&gt;
	&lt;memoryTune&gt;低&lt;/memoryTune&gt;
	&lt;autoMigrate&gt;否&lt;/autoMigrate&gt;
	&lt;protectModel&gt;不启用&lt;/protectModel&gt;
	&lt;protect&gt;0&lt;/protect&gt;
	&lt;hostStatus&gt;1&lt;/hostStatus&gt;
	&lt;pageHostStatus&gt;1&lt;/pageHostStatus&gt;
	&lt;secretLevel&gt;内部公开&lt;/secretLevel&gt;
	&lt;templateId&gt;38&lt;/templateId&gt;
	&lt;isSecret&gt;false&lt;/isSecret&gt;
	&lt;diskSecret&gt;false&lt;/diskSecret&gt;
	&lt;isClusterSafety&gt;false&lt;/isClusterSafety&gt;
	&lt;existPrealloc&gt;false&lt;/existPrealloc&gt;
	&lt;existRaw&gt;false&lt;/existRaw&gt;
	&lt;haEnable&gt;1&lt;/haEnable&gt;
&lt;/domainSummary&gt;
          </pre>
        </div>
      </dl>
  </div>
  </div>
</div>
</body>
</html>